package com.qf.product.controller;

import com.qf.dto.PageDto;
import com.qf.product.entity.Product;
import com.qf.product.service.ProductService;
import com.qf.vo.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 产品表 前端控制器
 * </p>
 *
 * @author xjj
 * @since 2023-10-31
 */
@RestController
@RequestMapping("/product")
@CrossOrigin
public class ProductController {

    @Autowired
    private ProductService productService;

    /*分页查询*/
    @PostMapping("page")
    public PageResult<Product> page(@RequestBody PageDto<Product> pageDto){
        return productService.pageInfo(pageDto);
    }





}
